<?php
$_SESSION['shop_return_url'] = $_SERVER['REQUEST_URI'];
?>
<style type="text/css">
.showDragHandle {
	background-image: url(<?php echo W_ROOT;?>/images/up_down.gif);
	background-repeat: no-repeat;
	background-position: center;
	cursor: n-resize;
}
</style>
<script
	type="text/javascript"
	src="<?php echo W_ROOT;?>/js/jquery.tablednd_0_5.js"></script>
<script type="text/javascript">
	drag_drop_row(3);
</script>
<script type="text/javascript">
function deleteRecord(id){
	if(confirm("Are you sure want to delete this one!")){
		window.location.href="index.php?view=delete&id="+id;
	}
}
</script>
<div class="breadcrumb"><a href="<?php echo base_url_admin;?>"><?php echo $lang['HOME'];?></a>
:: <a href="#"><?php echo $lang['LIST_USER_TYPE'];?></a></div>
<div class="box">
<?php
	$message_display = !empty($_GET['message'])? $_GET['message'] : "";
	switch ($message_display){
		case 'del':
			echo '<div class="warning">Account has been delete!</div>';
		break;
		case 'add':
			echo '<div class="success">Account has been added!</div>';
		break;
	}
?>
<div class="heading">
<h1><img src="../templates/image/user-group.png" alt="" /> <?php echo $lang['ACC_INFO'];?>

</h1>
<form action="#" method="post" name="frmlist">
<div class="buttons"><input class="button" type="button" name="btnadd"
	value="<?php echo $lang['ADD_NEW']; ?>"
	onClick="javascript:window.location.href='<?php echo base_url_admin;?>/account_type/index.php?view=add&amp'; return false;" />
</div>

</div>
<div class="content">
<table class="list">
	<thead>
		<td align="center"><?php echo $lang['ACC_ID']; ?></td>
		<td align="center"><input type="checkbox" name="chkall" id="chkall"
			onClick="checkAll(this.form,this.checked)" style="cursor: pointer;"></td>
		<td align="left" style="padding-left: 15px;"><?php echo $lang['ACC_NAME']; ?></td>
		<td><?php echo $lang['STATUS']; ?></td>
		<td><?php echo $lang['CRETE_DATE']; ?></td>
		<td><?php echo $lang['MODI_DATE']; ?></td>
		<td align="center"><?php echo $lang['OTHER'];?></td>
	</thead>
	<?php
	$qstring = '';
	$rowsPerPage = isset($_GET['num'])?$_GET['num']:'10';
	$sql = "SELECT * FROM tbluser_account_type ORDER BY id DESC";
	$result     = mysql_query(getPagingQuery($sql, $rowsPerPage));
	$pagingLink = getPagingLink($sql, $rowsPerPage, $qstring);
	$i = 0;
	if(dbNumRows($result)>0){
		while($row = mysql_fetch_assoc($result)){
			extract($row);

			if($i%2){
				$class = 'row1';
			}else{
				$class = 'row2';
			}
			$i++;
			?>
	<tr class="<?php echo $class;?>" id="<?php echo $id;?>">
		<td class="p_l" width="3%" align="center"><?php echo idFormat($i);?></td>
		<td width="3%" align="center"><input type="checkbox"
			id="chk<?php echo $i;?>" name="id[]"
			value="<?php //echo $account_type_id;?>" onclick="this.click()" /></td>
		<td class="p_l" align="left" style="padding-left: 15px;"><strong> <?php
		echo $account_type_name;
		?> </strong></td>
		<td class="p_l" width="7%" align="center"><?php echo stateImage($id,$status);?></td>
		<td class="p_l" width="13%" align="center"><?php echo $cdate;?></td>
		<td class="p_l" width="13%" align="center"><?php echo $mdate;?></td>
		<td class="p_l" width="13%" align="center">
			<a class="btn btn-primary btn-inverse" href="<?php echo base_url_admin;?>/account_type/index.php?view=add&amp;id=<?php echo $id;?>&amp;"><img width="20" src="../templates/image/Edit.gif" alt="<?php echo $lang['EDIT'];?>" /></a>
			<a class="btn btn-primary btn-inverse" onclick="return ConfirmDelete('<?php echo base_url_admin;?>/account_type/process.php?action=del&amp;id=<?php echo $id;?>')" href="javascript:;"><img width="20" src="../templates/image/trash.png" alt="<?php echo $lang['DELETE'];?>" /></a>
		</td>
	</tr>
	<?php
		}// end while
	}else{
		?>
	<tr>
		<td style="height: 50px;" colspan="7" align="center"><strong>No
		Account Type yet!</strong></td>
	</tr>
	<?php
	}
	?>
</table>
</form>
</div>
</div>
</div>
</div>
<!--<div class="row">-->
